package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Checkitem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CheckitemMapper extends BaseMapper<Checkitem> {

    @Select("select ci.* from check_group_item_t cg\n" +
            "left join checkitem_t ci on ci.id = cg.item_id\n" +
            "where cg.group_id = #{groupId}")
    List<Checkitem> findByGroupId(@Param("groupId") Long groupId);
}
